package com.winchain.chainbill.bill.biz.send.rx;

import com.shell.framework.rx.OnErrorNotImplementedSubscriber;
import com.winchain.chainbill.bill.biz.Bill;
import com.winchain.chainbill.bill.biz.BillEvent;
import com.winchain.chainbill.bill.biz.send.service.BillMoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class BillMoveSubscriber extends OnErrorNotImplementedSubscriber<BillEvent<? extends Object>> {
	@Autowired
	private BillMoveService billMoveService;

	public void onApplicationEvent(BillEvent<? extends Object> t) {
		this.billMoveService.move(t.getBill().getRec(), t.getOperation());
	}
}
